home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / tls / tls085.solintel.Z / tls085.solintel / lib / vtcl / tests / getlst.tcl < prev    next >
Encoding:
Text File  |  1995-07-20  |  828 b   |  42 lines

  1. # CVS $Id: getlst.tcl,v 1.4 1995/04/28 15:04:42 zibi Exp $
  2. # This script tests list communication
  3. # between wserver and wstcl
  4. #
  5. # VtGetString, VtGetList, and VtGet2DList all map to the 
  6. # same wserver function, DoGetList().  That function returns three integers
  7. # two strings and two string arrays, all at once.
  8. # The returned tcl result is dependant on the return type
  9. # of the wstcl command.
  10. #
  11.  
  12. VtOpen "test"
  13.  
  14. echo "Calling VtGetString ..."
  15. set str [VtGetString]
  16. echo "     <$str>"
  17.  
  18. echo "\nCalling VtGetList ..."
  19. set lst [VtGetList]
  20.  
  21. set row 0
  22. foreach i  $lst {
  23.     echo "  list($row) is <$i>"
  24.     incr row 1
  25. }
  26.  
  27. echo "\nCalling VtGet2DList ..."
  28. set lst [VtGet2DList]
  29.  
  30. set row 0
  31. foreach i $lst {
  32.     set col 0
  33.     foreach j $i {
  34.     echo "list($row, $col) is <$j>"
  35.     incr col 1
  36.     }
  37.     echo "--------"
  38.     incr row 1
  39. }
  40.  
  41. VtClose
  42.